-
Notifications
You must be signed in to change notification settings - Fork 218
Replace SplineDefinition with IECore::Ramp, and Store RampData in Shaders #6717
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
0c8defb to
2939020
Compare
johnhaddon
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Daniel! There's a colossal amount of change here (it pretty much brought my web browser to its knees), but I think it all makes sense. Let's chat about what we want to do with ColorSpline.osl/ColorRamp.osl compatibility in our meeting later today...
|
Currently working through the details of these comments, mostly pretty straightforward. While looking at your comments about renaming "spline" -> "ramp" in variable names, I did some grepping for "spline" ... there are actually a bunch more places where a rename makes sense ... not going to help if your browser was struggling with the size of this PR before, but it does make sense to address them at the same time. The only things that came up potentially needing discussion:
|
|
I think I've now addressed all comments ... hopefully it doesn't bog your browser down too much, since you were saying this PR was already giving you issues for some reason. If it would help, I can try to pull anything that isn't a simple rename out of the big rename commit - though I'd probably do that after squashing 59f2572 into the big rename. |
b67c436 to
4cbd7e5
Compare
4cbd7e5 to
7b76754
Compare
|
Squashed last round of fixes, added changelog entries, switched dependencies to Cortex-10.7.0.0a1. I should mention one fix that I've squashed that wasn't in the last round of fixes to review: I must not have tested the most recent version of IECoreArnoldTest, because the last round of tests of testOSLShaders were trying to compare the addresses of shaders connected to the duplicated endpoints, and that was failing - I've switched to checking that the properties of the connected shaders are correct, and that seems to be working fine now. This should be good for interactive testing, and as far as I know, basically ready to merge. |
Linear splines in OSL only need 1 extra endpoint. This test had linear splines with 2 extra endpoints, because it started from a Cortex representation that already had an extra endpoint - that's conceptually wrong, IECore::Spline only uses duplicate end points for curve types where it is required for evaluation, not for linear.
Previously, connections to color components in OSL shaders would fail in 3Delight
IECoreScene::ShaderNetworkAlgo::expandSplineParameters was the deprecated way to handle spline parameters. IECoreArnold::ShaderNetworkAlgo is now doing the up to date approach - there is a call to IECoreScene::ShaderNetworkAlgo::convertToOSLConventions in preprocessedNetwork, which will have already converted splines. As far as I can tell, this means that expandSplineParameters was currently not doing anything, and the fact it was still being called was simply an oversight.
baddb88 to
dfe1d95
Compare
|
I've removed the platform23 test. Unfortunately still got two test failures, but they seem unrelated. |
In combination with the recent Cortex PR: ImageEngine/cortex#1499,
this implements the new way of working with shader ramp parameters that we've been discussing.
There are a lot of changes here, but most are quite trivial - it all follows pretty directly from the Cortex changes. A lot of just renaming things, though there are a few places where I was actually able to cut down on code duplication.
The commit sequence is structured so that after the first 5 commits, this will build against the new Cortex, while having made as few changes as possible ( this was handy when checking behaviour changes ).
The piece I'm most skeptical of is "FIX : ColorRamp and FloatRamp : Fix actual default value", which is why I made it a separate commit ... maybe that's getting too tricksy with the compatibility config? The advantage of this approach is that once all production files have been produced with new Gaffer, we could get rid of the compatibility config, and things would be clean, rather than needing to keep around splineUIMetadata.py for eternity.